/**
 * Author(s): xuming.Wong <xuming.Wong@gmail.com>
 */

#ifndef __WOW_DBC_H__
#define __WOW_DBC_H__

#include "GPrerequisites.h"
#include "WOWCommon.h"

namespace GNgine
{
	/*Database client (convert to sqlite)?
	*/
	class WOWDbcHeader
	{
	public:
		char signature[4];//'WDBC'
		int records;
		int fields;
		int recordSize;
		int strBlockSize;
	};

	typedef struct _light_dbc_record{
		int id;
		int ref_map_id;
		float pos_x;
		float pos_y;
		float pos_z;

		float inner_radius;
		float outer_radius;
		
		int light_band_id;//These entries are all IDs in LightIntBand.dbc, LightFloatBand.dbc as well as LightParams.dbc.
		int water_setting;
		int sunset_param;
		int other_param;
		int death_param;

	} light_dbc_record;

	
	typedef struct _light_int_band_record{
		unsigned int id;
		unsigned int nEntries;
		unsigned int times[16];
		unsigned int values[16];
	} light_int_band_record;

	struct CharSectionRecord
	{
		unsigned int id;
		unsigned int race;
		unsigned int gender;//0 male 1 femel
		unsigned int type;// 0 - Base Skin	 1 - Face	 2 - Facial Hair	 3 - Hair	 4 - Underwear
		unsigned int texture1;//texture string offset,but we already get string ptr using offset and string table
		unsigned int texture2;
		unsigned int texture3;
		unsigned int flags;
		unsigned int section;
		unsigned int color;
	};


	class ChrRacesRecord
	{
	public:
		unsigned int raceId;
		unsigned int maleModelId;
		unsigned int femaleModelId;
		char* shortName;
		char* name;
		char* fullName;

		char* geotype1;
		char* geotype2;
		char* geotype3;

	};

	class CharFaceHairRecord
	{
	public:
		unsigned int race;
		unsigned int gender;
		unsigned int style;
		unsigned int geoset100;
		unsigned int geoset300;
		unsigned int geoset200;
	};

	class CharHairGeoRecord
	{
	public:
		unsigned int id;//0
		unsigned int race;
		unsigned int gender;
		unsigned int hairstyle;
		unsigned int geoset;
		unsigned int bald;
	} ;


	typedef struct _ChrAnimDataRecord{
		unsigned int id;//feild 0
		unsigned int name;//feild 1
	} ChrAnimDataRecord;
}
#endif
